home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / tdiskvi4.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  840 b   |  32 lines

  1. //    Copyright (c) 1994, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TDiskView
  4. //    Include File:    tdiskvie.h
  5. //    Purpose:    Display the amount of free disk space.
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        02-18-94    created
  9. #include"tdiskvie.h"
  10. #include<strstrea.h>
  11. #include<iomanip.h>
  12.  
  13. void TDiskView::draw()    {
  14. //    Purpose:    Redraw the view.
  15. //    Arguments:    none
  16. //    Return Value:    none
  17. //    Remarks/Portability/Dependencies/Restrictions:
  18. //    Revision History:
  19. //        02-18-94    created
  20.  
  21.     TDrawBuffer TDB;
  22.     char c = getColor(2);
  23.  
  24.     //    Convert to a string.
  25.     ostrstream totalStr(DiskInAscii, sizeof(DiskInAscii));
  26.     totalStr << setw(12) << uli_pres << ends;
  27.  
  28.     //    First clear then redraw.
  29.     TDB.moveChar(0, ' ', c, size.x);
  30.     TDB.moveStr(0, DiskInAscii, c);
  31.     writeLine(0, 0, size.x, 1, TDB);
  32. }